package com.yunhe.authority.domain.authority;

import com.yunhe.authority.domain.company.Company;
import com.yunhe.authority.domain.office.Office;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.neo4j.ogm.annotation.*;

import java.util.List;

/**
 * @author zhengbo
 * @date 2021/5/11 15:09
 * 真实园区
 */
@ApiModel(value = "RealStation", description = "实际电站对象")
@NodeEntity
public class RealStation extends Station {

    @ApiModelProperty(value = "ID")
    @Id
    @GeneratedValue
    private Long id;
    @ApiModelProperty(value = "编号")
    private String name;
    @ApiModelProperty(value = "代码",hidden = true)
    private Long code;
    @ApiModelProperty(value = "标题",hidden = true)
    private String title;

    @ApiModelProperty(value = "简称")
    private String abbreviationName;

    private boolean disabled = false;

    @ApiModelProperty(value = "厂房列表")
    private List<Office> officeList;
    /**属于总的园区*/
//    @Relationship(type = "BELONG_TO_STATION")
    private Station belongToStation;

    /**拥有的厂房*/
//    @Relationship(type = "HAS_OFFICES")
    private List<Office> hasOffices;

    /**拥有的企业*/
//    @Relationship(type = "HAS_COMPANIES")
    private List<Company> hasCompanies;

    public boolean isDisabled() {
        return disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    public String getAbbreviationName() {
        return abbreviationName;
    }

    private boolean isEffective=true;

    public boolean isEffective() {
        return isEffective;
    }

    public void setEffective(boolean effective) {
        isEffective = effective;
    }

    public void setAbbreviationName(String abbreviationName) {
        this.abbreviationName = abbreviationName;
    }

    public Station getBelongToStation() {
        return belongToStation;
    }

    public void setBelongToStation(Station belongToStation) {
        this.belongToStation = belongToStation;
    }

    public List<Office> getHasOffices() {
        return hasOffices;
    }

    public void setHasOffices(List<Office> hasOffices) {
        this.hasOffices = hasOffices;
    }

    public List<Company> getHasCompanies() {
        return hasCompanies;
    }

    public void setHasCompanies(List<Company> hasCompanies) {
        this.hasCompanies = hasCompanies;
    }

    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Long getCode() {
        return code;
    }

    @Override
    public void setCode(Long code) {
        this.code = code;
    }

    @Override
    public String getTitle() {
        return title;
    }

    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    public List<Office> getOfficeList() {
        return officeList;
    }

    public void setOfficeList(List<Office> officeList) {
        this.officeList = officeList;
    }
}
